--[[
飺
    ˽űǶӢеߡ

ʹ˵
    趨ĿݼǶӢȫߵλãĬϿݼΪI
޸ģ޸λüűġ

ע
ٻӭ飬qq:167849866 bbs.myebe.com

                                      ߣǡ
                                                    ]]

--űģ

if getwshscriptversion() < 2 then
    msgbox('ʹ2.4汾')
end

--û޸Ĵ
--73Iļ룬޸OΪ79
dropkey=73  
--û޸Ĵ

itemtab={}
itemtab[1]={x=0.66,y=0.83}
itemtab[2]={x=0.71,y=0.83}
itemtab[3]={x=0.66,y=0.9}
itemtab[4]={x=0.71,y=0.9}
itemtab[5]={x=0.66,y=0.96}
itemtab[6]={x=0.71,y=0.96}

setkeywatch('keyhookfunc')

function keyhookfunc(keycode, controlkey, downorup)
    if 0==iswar3front() then return 0 end
    if 1==ischat() then return 0 end
    if downorup==1 then return 0 end
    if keycode==dropkey and downorup==0 then
        currentx,currenty = getcursorpos()
        sleep(20)
        war3w = getwar3window()
        war3wl,war3wr,war3wt,war3wb = getwindowrect(war3w)
        keydown(16)
        sleep(10)
	for i = 1,6,1 do
            itemx=war3wl+(war3wr-war3wl)*itemtab[i]["x"]
            itemy=war3wt+(war3wb-war3wt)*itemtab[i]["y"]
            setcursorpos(itemx, itemy)
            lockmouse(itemx, itemy)
            sleep(30)
            mousedown(1)
            sleep(10)
            mouseup(1)
            sleep(30)
            lockmouse(-1, -1)
            setcursorpos(currentx, currenty)
            lockmouse(currentx, currenty)
            sleep(30)
            mousedown(0)
            sleep(10)
            mouseup(0)
            sleep(30)
            lockmouse(-1, -1)
	end
        sleep(10)
        keyup(16)
    return 1
    end
end